<section class="wrapper site-min-height" xmlns:th="http://www.w3.org/1999/xhtml">
    <h3><i class="fa fa-angle-right"></i> 课程总览</h3>
    <div class="row mt">
        <div class="col-lg-12">
            <div class="content-panel">
                <section id="no-more-tables">
                    <table class="table table-bordered table-striped table-condensed cf">
                        <thead class="cf">
                        <tr>
                            <th>课程编号</th>
                            <th>课程</th>
                            <th>指导教师</th>
                            <th>人数上限</th>
                            <th>当前人数</th>
                            <th></th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr th:id="${classInfo.classId}" th:each="classInfo:${classes}">
                            <td data-title="课程编号" th:text="${classInfo.classId}">{课程编号}</td>
                            <td data-title="课程" th:text="${classInfo.className}">{课程}</td>
                            <td data-title="指导教师" th:text="${classInfo.teacherIdFK.name}">{指导教师}</td>
                            <td data-title="人数上限">
                                <div th:if="${classInfo.max eq -1}" th:text="无限制"></div>
                                <div th:unless="${classInfo.max eq -1}" th:text="${classInfo.max}"></div>
                            </td>
                            <td data-title="当前人数" th:text="${classInfo.total}"></td>
                            <td>
                                <button class="btn btn-primary btn-xs" th:onclick="'javascript:getClassManagementpage('+${classInfo.classId}+')'"><i class="fa fa-pencil"></i></button>
                                <button class="btn btn-primary btn-xs" th:onclick="'javascript:updateModelValue('+${classInfo.classId}+')'" data-toggle="modal" data-target="#fileUpload"><i class="fa fa-file-excel-o"></i></button>
                                <button class="btn btn-primary btn-xs" th:onclick="'javascript:selectStudentClass('+${classInfo.classId}+')'" name="selectStudentButton"><i class="fa fa-upload"></i></button>
                            </td>
                        </tr>
                        <tr>
                            <td>{课程编号}</td>
                            <td>{课程}</td>
                            <td>{指导老师}</td>
                            <td>{人数上限}</td>
                            <td>{当前人数}</td>
                            <td>
                                <button class="btn btn-success btn-xs" th:onclick="'javascript:addClassPage()'"><i class="fa fa-plus"></i></button>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </section>


                <!-- 模态框（Modal） -->
                <div class="modal fade" id="fileUpload" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                    &times;
                                </button>
                                <h4 class="modal-title" id="myModalLabel">
                                    上传Excel文件
                                </h4>
                            </div>
                            <div class="modal-body">
                                <input type="file" id="studentFile"/>
                                <input type="hidden" id="studentFileClass"/>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                                </button>
                                <button class="btn btn-default" th:onclick="'javascript:uploadStudentFile()'" name="studentFileButton">上传文件</button>
                            </div>
                        </div><!-- /.modal-content -->
                    </div><!-- /.modal -->
                </div>


            </div><!-- /content-panel -->
        </div><!-- /col-lg-12 -->
    </div><!-- /row -->
</section>

